bitkeeper revision 1.1236.1.12 (421da2beCWorg82h5pKlUfgL04gvhA)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Thu, 24 Feb 2005 09:47:42 +0000 (09:47 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Thu, 24 Feb 2005 09:47:42 +0000 (09:47 +0000)
Fix x86/64 get_stack_bottom().
Signed-off-by: Keir Fraser <keir.fraser@cl.cam.ac.uk>
xen/include/asm-x86/x86_64/current.h

index fb5a7abc021496ff19a97c405e9e6697197132c0..67d7c9ef976dc50f13f733ec5dfe65065f569bbe 100644 (file)
@@ -41,8 +41,9 @@ static inline execution_context_t *get_execution_context(void)
 static inline unsigned long get_stack_bottom(void)
 {
     unsigned long p;
-    __asm__ ( "orq %%rsp,%0; andq $~7,%0" 
-              : "=r" (p) : "0" (STACK_SIZE-64) );
+    __asm__( "andq %%rsp,%0; addq %2,%0"
+           : "=r" (p)
+           : "0" (~(STACK_SIZE-1)), "i" (STACK_SIZE-64) );
     return p;
 }